package com.superbytecode.cloud.common.entities.diff;

import lombok.Data;

/**
 * All rights Reserved, Designed By www.super-master.com
 *
 * @ProjectName: sanskrit
 * @Package: com.superbytecode.cloud.core.entities.diff
 * @ClassName: ValueDiff
 * @Description: [差异值]
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2024/8/16 16:35
 * @Version: V1.0
 * @Copyright: 2024 www.super-master.cn Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
@Data
public class FieldProperty {
    /**
     * 原始值：oldValue
     */
    private Object sourceValue;
    /**
     * 目标值：neeValue
     */
    private Object targetValue;

    // -----------------------------------------------------------------------------------------------------------------
    public static FieldProperty newInstance(final Object sourceValue, final Object targetValue) {
        FieldProperty fieldProperty = new FieldProperty();
        fieldProperty.setSourceValue(sourceValue);
        fieldProperty.setTargetValue(targetValue);
        return fieldProperty;
    }
}